select a.`threadId`,a.`object`,a.`objectType`,a.`parentId`,
a.`userName`,a.`commentDate`,a.`hits`,a.`type`,a.`points`,
a.`votes`,a.`average`,a.`title`,a.`data`,a.`hash`,a.`user_ip`,
a.`summary`,a.`smiley`,a.`message_id`,a.`in_reply_to`,a.`comment_rating`, IFNULL(max(b.`commentDate`), a.`commentDate`) as `lastPost`,
count(b.`threadId`) as `replies`
from `tiki_comments` a left join `tiki_comments` b
on b.`parentId`=a.`threadId`
where a.`object`=?
and a.`type` = ? and a.`objectType` = 'forum'
and a.`parentId` = ? group by a.`threadId`,a.`object`,a.`objectType`,a.`parentId`,a.`userName`,a.`commentDate`,a.`hits`,a.`type`,a.`points`,a.`votes`,a.`average`,a.`title`,a.`data`,a.`hash`,a.`user_ip`,a.`summary`,a.`smiley`,a.`message_id`,a.`in_reply_to`,a.`comment_rating` order by , `threadId`
Values:
0
1
s
2
0
Message:
Error Message
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `threadId` LIMIT 0,0' at line 10